# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1UpdateAppGroupAppKeyRequest do
  @moduledoc """
  Request for UpdateAppGroupAppKey

  ## Attributes

  *   `action` (*type:* `String.t`, *default:* `nil`) - Approve or revoke the consumer key by setting this value to `approve` or `revoke` respectively. The `Content-Type` header, if set, must be set to `application/octet-stream`, with empty body.
  *   `apiProducts` (*type:* `list(String.t)`, *default:* `nil`) - The list of API products that will be associated with the credential. This list will be appended to the existing list of associated API Products for this App Key. Duplicates will be ignored.
  *   `appGroupAppKey` (*type:* `GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1AppGroupAppKey.t`, *default:* `nil`) - The new AppGroupKey to be amended. Note that the status can be updated only via action.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :action => String.t() | nil,
          :apiProducts => list(String.t()) | nil,
          :appGroupAppKey => GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1AppGroupAppKey.t() | nil
        }

  field(:action)
  field(:apiProducts, type: :list)
  field(:appGroupAppKey, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1AppGroupAppKey)
end

defimpl Poison.Decoder,
  for: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1UpdateAppGroupAppKeyRequest do
  def decode(value, options) do
    GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1UpdateAppGroupAppKeyRequest.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1UpdateAppGroupAppKeyRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
